package com.kwedding.util;

public enum Response {
	   SUCCESS(0),FAILED(1);
	    private  Integer code;
	    private String msg;
       	
        private Response(Integer code){
        	this.code = code;
        }
        
        public static String getMsg(Integer code){
        	Response[] responses = Response.values();
        	for(Response response:responses){
        		if(response.getCode().compareTo(code)==0){
        			return response.getMsg();
        		}
        	}
        	return null;
        }

		public Integer getCode() {
			return code;
		}

		public void setCode(Integer code) {
			this.code = code;
		}

		public String getMsg() {
			return msg;
		}

		public void setMsg(String msg) {
			this.msg = msg;
		}
        
        
}
